package com.hdax.dm.mapstucts.qinziDtoMapper;

import com.hdax.dm.beans.item.Item;
import com.hdax.dm.dto.qinziDto.getCalendarDataDto;
import com.hdax.dm.dto.qinziDto.getParentDto;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;

import java.util.List;

@Mapper(componentModel = "Spring")
public abstract class getCalendarDataDtoMapper {

    public abstract getCalendarDataDto toTarget(Item source);

    public abstract List<getCalendarDataDto> toTargetList(List<Item> sources);

    @Mapping(source = "startTime",target = "startDate")
    public abstract getParentDto toItem(Item source);

    public abstract List<getParentDto> toItemList(List<Item> sources);
}
